package com.zzy.ymcc.controller;

import com.zzy.ymcc.doc.CourseDoc;
import com.zzy.ymcc.result.JSONResult;
import com.zzy.ymcc.service.ICourseEsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/search")
public class CourseEsController {

    @Autowired
    private ICourseEsService courseEsService;

    @RequestMapping(value="/courseEsAdd",method= RequestMethod.POST)
    public JSONResult courseEsAdd(@RequestBody CourseDoc courseDoc){
        courseEsService.courseEsAdd(courseDoc);
        return JSONResult.success();
    }

}